<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>VueTest</title>
</head>
<body>
<!--view层，模板-->
<div id="app">
    <h1 v-if="type">Yes</h1>
    <h1 v-else>No</h1>

</div>

<!--1.导入Vue.js-->
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.21/dist/vue.min.js"></script>
<script type="text/javascript">
    let vm = new Vue({
        el: "#app",
        data: {
            type: true
        }
    });
</script>
<!-- vm.type=false -->
<!-- 使用v-*属性绑定数据是不需要双花括号包裹的 -->
</body>
</html>
